Skip to content

Read EXIF orientation from GDI+ and fix dialog resource IDs - #96

Open
baifan-wang wants to merge 2 commits into
voidtools:masterfrom
baifan-wang:fix/exif-orientation
Open

baifan-wang wants to merge 2 commits into
voidtools:masterfrom
baifan-wang:fix/exif-orientation

Conversation

@baifan-wang

Copy link
Copy Markdown

Problem

Automatic rotation relies on the Windows Shell property store. When it does not supply an orientation, the GDI+ loading path does not read the metadata available in the decoded image. Current dialog procedures also reference missing resource IDs, preventing a Release x64 build.

Changes

  • Read EXIF Orientation (0x0112) from GDI+ before calculating display dimensions and drawing. Prefer valid values 1–8, retain the Shell result when unavailable, and respect config_orientation.
  • Map renamed control IDs to matching existing controls and assign IDs to labels/group boxes used by localization.
  • Keep resource and orientation fixes in separate commits.

Validation

  • Successfully built vs2026/voidImageViewer.vcxproj, Release|x64.
  • Independently verified GDI+ reads the expected Orientation values from generated JPEGs tagged 1–8.
  • The patched application opened an Orientation=6 JPEG with stored dimensions 160x90 and displayed 90x160 in its status bar.

Full visual verification of all eight transformations and dialog interactions has not been completed. Images without orientation metadata cannot be oriented reliably from dimensions alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant